import request from "../utils/request";

// 根据用户获取拼团
export function getByUserAPI(userId) {
    return request({
        url: "guser/getByUser",
        method: "GET",
        params: {
            userId
        }
    });
}

// 删除拼团
export function deleteGUserAPI(gUserId, gId) {
    return request({
        url: "guser/delete",
        method: "GET",
        params: {
            gUserId,
            gId
        }
    });
}

// 加入拼团
export function addGUserAPI(groupUser) {
    return request({
        url: "guser/add",
        method: "POST",
        data: {
            guGroup: groupUser.guGroup,
            guUser: groupUser.guUser,
            guPaysta: groupUser.guPaysta
        }
    });
}
